/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.problem.bank.entity;

import com.jeesite.modules.zx.options.bank.entity.ToptionsBank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.List;

/**
 * 问题库Entity
 * @author zpp
 * @version 2020-03-27
 */
@Table(name="t_problem_bank", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="obj_name", attrName="objName", label="问题名称", queryType=QueryType.LIKE),
		@Column(name="subject_id", attrName="subjectId", label="题目标识"),
		@Column(name="obj_type", attrName="objType", label="问题类型"),
		@Column(name="obj_answer", attrName="objAnswer", label="答案"),
		@Column(name="score", attrName="score", label="问题得分"),
		@Column(name="analysis", attrName="analysis", label="解析"),
	}, orderBy="a.id DESC"
)
public class TproblemBank extends DataEntity<TproblemBank> {
	
	private static final long serialVersionUID = 1L;
	private String objName;		// 问题名称
	private String subjectId;		// 题目标识
	private Integer objType;		// 问题类型
	private String objAnswer;		// 答案
	private Double score;		// 问题得分
	private String analysis;		// 解析

	private List<ToptionsBank>  toptionsBankList;
	public List<ToptionsBank> getToptionsBankList() {
		return toptionsBankList;
	}

	public void setToptionsBankList(List<ToptionsBank> toptionsBankList) {
		this.toptionsBankList = toptionsBankList;
	}

	public TproblemBank() {
		this(null);
	}

	public TproblemBank(String id){
		super(id);
	}
	
	@Length(min=0, max=255, message="问题名称长度不能超过 255 个字符")
	public String getObjName() {
		return objName;
	}

	public void setObjName(String objName) {
		this.objName = objName;
	}
	
	@Length(min=0, max=50, message="题目标识长度不能超过 50 个字符")
	public String getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(String subjectId) {
		this.subjectId = subjectId;
	}
	
	public Integer getObjType() {
		return objType;
	}

	public void setObjType(Integer objType) {
		this.objType = objType;
	}
	
	@Length(min=0, max=10, message="答案长度不能超过 10 个字符")
	public String getObjAnswer() {
		return objAnswer;
	}

	public void setObjAnswer(String objAnswer) {
		this.objAnswer = objAnswer;
	}
	
	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}
	
	@Length(min=0, max=555, message="解析长度不能超过 555 个字符")
	public String getAnalysis() {
		return analysis;
	}

	public void setAnalysis(String analysis) {
		this.analysis = analysis;
	}
	
}